package operations;

import java.io.Serializable;

import data.DataObject;

public class Operation  implements Serializable{
	private int type;
	private String target = null;
	private Replicated replicated;
	private DataObject data = null;
	
	public Operation() {
	}
	
	public Operation(int type, int replicated, DataObject data) {
		this.type = type;
		this.replicated.setValue(replicated);
		this.data = data;
	}
	
	public Operation(int type, String target, int replicated, DataObject data) {
		this.type = type;
		this.target = target;
		this.replicated.setValue(replicated);
		this.data = data;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public Replicated getReplicated() {
		return replicated;
	}

	public void setReplicatedValue(int replicated) {
		this.replicated.setValue(replicated);
	}

	public DataObject getData() {
		return data;
	}

	public void setData(DataObject data) {
		this.data = data;
	}
	
	
}
